import { Storage } from '@/utils/storage'
import { ACCESS_TOKEN, CURRENT_USER, USER_TYPE } from '@/store/mutation-types'

export type IUserState = {
  token: string
  name: string
  welcome: string
  avatar: string
  roles: any[]
  info: any
  typemode: string
  bizType: unknown
}

export const state: IUserState = {
  token: Storage.get(ACCESS_TOKEN, ''),
  name: '',
  welcome: '',
  avatar: '',
  roles: [],
  info: Storage.get(CURRENT_USER, {}),
  typemode: '',
  bizType: null
}
